Conditional write processing for a cache structure of a coupling facility

ABSTRACT

A method for managing a cache structure of a coupling facility includes receiving a conditional write command from a computing system and determining whether data associated with the conditional write command is part of a working set of data of the cache structure. If the data associated with the conditional write command is part of the working set of data of the cache structure the conditional write command is processed as an unconditional write command. If the data associated with the conditional write command is not part of the working set of data of the cache structure a conditional write failure notification is transmitted to the computing system.

BACKGROUND

The present invention relates to data management, and more specifically,to methods and systems for conditional write processing for a cachestructure of a coupling facility.

In parallel computing systems, multiple computers or mainframes acttogether as a single system and share data using one or more couplingfacilities. Data management middleware products running on the severalsystems participate in the data sharing environment by exploiting acache structure, a lock structure and/or a list structure of thecoupling facility. The cache structure allows the computing systems tostore data in a high-performance cache that is accessible by all of thesystems in the parallel computing system. The coupling facilitymaintains a shared directory that tracks the validity of individual datain each of the middleware local in-memory caches, which is used tomaintain cache coherency and data integrity for the shared data acrossall middleware instances.

Certain kinds of write-intensive database activities such as batch jobsthat modify most or all of the data items in a shared database can havethe effect of overwhelming the cache structure of the coupling facilityby flooding the structure with numerous changed data pages which are notpart of the normal working set of the cache structure. For example,these activities may include database reorganizations, indexrestructurings, or making application-oriented updates across all dataitems. During such operations the cache structure of the couplingfacility can become overwhelmed with a flood of write commands thatdisplace the normal working set data in the cache structure, therebycausing temporary performance degradation or disruption and adverselyaffecting the performance of applications that are making use of theshared data.

SUMMARY

According to an exemplary embodiment, a method for managing a cachestructure of a coupling facility includes receiving a conditional writecommand from a computing system and determining whether data associatedwith the conditional write command is part of a working set of data ofthe cache structure. If the data associated with the conditional writecommand is part of the working set of data of the cache structure theconditional write command is processed as an unconditional writecommand. If the data associated with the conditional write command isnot part of the working set of data of the cache structure a conditionalwrite failure notification is transmitted to the computing system,whereby the conditional write failure notification instructs thecomputing system to write the data associated with the conditional writecommand directly to a direct access storage device.

According to another exemplary embodiment, a computer program productfor managing a cache structure of a coupling facility includes atangible storage medium readable by a processing circuit and storinginstructions for execution by the processing circuit for performing amethod. The method includes receiving a conditional write command from acomputing system and determining whether data associated with theconditional write command is part of a working set of data of the cachestructure. If the data associated with the conditional write command ispart of the working set of data of the cache structure the conditionalwrite command is processed as an unconditional write command. If thedata associated with the conditional write command is not part of theworking set of data of the cache structure a conditional write failurenotification is transmitted to the computing system, whereby theconditional write failure notification instructs the computing system towrite the data associated with the conditional write command directly toa direct access storage device.

According to yet another exemplary embodiment, a system for managing acache structure of a coupling facility, the system includes a processorunit configured to perform a method. The method includes receiving aconditional write command from a computing system and determiningwhether data associated with the conditional write command is part of aworking set of data of the cache structure. If the data associated withthe conditional write command is part of the working set of data of thecache structure the conditional write command is processed as anunconditional write command. If the data associated with the conditionalwrite command is not part of the working set of data of the cachestructure a conditional write failure notification is transmitted to thecomputing system, whereby the conditional write failure notificationinstructs the computing system to write the data associated with theconditional write command directly to a direct access storage device.

Additional features and advantages are realized through the techniquesof the present invention. Other embodiments and aspects of the inventionare described in detail herein and are considered a part of the claimedinvention. For a better understanding of the invention with theadvantages and the features, refer to the description and to thedrawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The subject matter which is regarded as the invention is particularlypointed out and distinctly claimed in the claims at the conclusion ofthe specification. The forgoing and other features, and advantages ofthe invention are apparent from the following detailed description takenin conjunction with the accompanying drawings in which:

FIG. 1 is a block diagram illustrating one example of a processingsystem for practice of the teachings herein;

FIG. 2 is a block diagram that illustrates a parallel computing systemincluding a coupling facility in accordance with an exemplaryembodiment;

FIG. 3 is a flow diagram that illustrates a method for managing a cachestructure of a coupling facility including conditional write processingin accordance with an exemplary embodiment; and

FIG. 4 is a flow diagram that illustrates another method for managing acache structure of a coupling facility including conditional writeprocessing in accordance with an exemplary embodiment is shown.

DETAILED DESCRIPTION

Referring to FIG. 1, there is shown an embodiment of a processing system100 for implementing the teachings herein. In this embodiment, thesystem 100 has one or more central processing units (processors) 101 a,101 b, 101 c, etc. (collectively or generically referred to asprocessor(s) 101). In one embodiment, each processor 101 may include areduced instruction set computer (RISC) microprocessor. Processors 101are coupled to system memory 114 and various other components via asystem bus 113. Read only memory (ROM) 102 is coupled to the system bus113 and may include a basic input/output system (BIOS), which controlscertain basic functions of system 100.

FIG. 1 further depicts an input/output (I/O) adapter 107 and a networkadapter 106 coupled to the system bus 113. I/O adapter 107 may be asmall computer system interface (SCSI) adapter that communicates with ahard disk 103 and/or tape storage drive 105 or any other similarcomponent. I/O adapter 107, a direct access storage device or hard disk103, and tape storage device 105 are collectively referred to herein asmass storage 104. A network adapter 106 interconnects bus 113 with anoutside network 116 enabling data processing system 100 to communicatewith other such systems and external storage devices. A screen (e.g., adisplay monitor) 115 is connected to system bus 113 by display adaptor112, which may include a graphics adapter to improve the performance ofgraphics intensive applications and a video controller. In oneembodiment, adapters 107, 106, and 112 may be connected to one or moreI/O busses that are connected to system bus 113 via an intermediate busbridge (not shown). Suitable I/O buses for connecting peripheral devicessuch as hard disk controllers, network adapters, and graphics adapterstypically include common protocols, such as the Peripheral ComponentsInterface (PCI). Additional input/output devices are shown as connectedto system bus 113 via user interface adapter 108 and display adapter112. A keyboard 109, mouse 110, and speaker 111 all interconnected tobus 113 via user interface adapter 108, which may include, for example,a Super I/O chip integrating multiple device adapters into a singleintegrated circuit.

Thus, as configured in FIG. 1, the system 100 includes processingcapability in the form of processors 101, storage capability includingsystem memory 114 and mass storage 104, input means such as keyboard 109and mouse 110, and output capability including speaker 111 and display115. In one embodiment, a portion of system memory 114 and mass storage104 collectively store an operating system such as the z/OS® operatingsystem from IBM Corporation to coordinate the functions of the variouscomponents shown in FIG. 1.

Examples of operating systems that may be supported by the system 100include Windows 95, Windows 98, Windows NT 4.0, Windows XP, Windows2000, Windows CE, Windows Vista, Macintosh, Java, LINUX, and UNIX, z/OSor any other suitable operating system. The system 100 also includes anetwork interface 116 for communicating over a network. The network canbe a local-area network (LAN), a metro-area network (MAN), or wide-areanetwork (WAN), such as the Internet or World Wide Web. Users of thesystem 100 can connect to the network through any suitable networkinterface 116 connection, such as standard telephone lines, digitalsubscriber line, LAN or WAN links (e.g., T1, T3), broadband connections(Frame Relay, ATM), and wireless connections (e.g., 802.11a, 802.11b,802.11g).

As disclosed herein, the system 100 includes machine readableinstructions stored on machine readable media (for example, the harddisk 104) for capture and interactive display of information shown onthe screen 115 of a user. As discussed herein, the instructions arereferred to as “software” 120. The software 120 may be produced usingsoftware development tools as are known in the art. Also discussedherein, the software 120 may also referred to as a “command line testingtool” 120, an “a testing interface” 120 or by other similar terms. Thesoftware 120 may include various tools and features for providing userinteraction capabilities as are known in the art. The software 120 caninclude a database management subsystem such as DB2®, which managesstructured data access requests and queries from end users andapplications.

Referring now to FIG. 2, a block diagram illustrating a parallelcomputing system 200 including a coupling facility 204 is shown. Theparallel computing system 200 includes a plurality of computing systems202 that are each in communication with one or more coupling facilities204. In exemplary embodiments, either or both of the coupling facilities204 or the computing systems 202 may be a processing system as describedwith reference to FIG. 1. The coupling facility 204 includes a cachestructure 206 which is a shared data storage utilized by the pluralityof computing systems 202. In addition, the parallel computing system 200includes one or more direct access storage devices 208. The directaccess storage devices 208 are in communication with the plurality ofcomputing systems 202.

In exemplary embodiments, the cache structure 206 of the couplingfacility 204 is designed to process a conditional write command. Theconditional write command allows the coupling facility 204 toconditionally perform data writes to the cache structure 206. A datawrite is a write of changed data that has been modified from its priorcontents as a result of some program or end-user update. In exemplaryembodiments, if the data being written to the cache structure 206 isdetermined by the coupling facility 204 to be part of the normal workingset of data in the cache structure 206, the write operation will proceednormally. However, if the data being written is determined by thecoupling facility 204 to not be part of the normal working set of datain the cache structure 206, the write operation will be rejected as aconditional write failure. The data management middleware 210, locatedon each of the plurality of computing systems 202, may be designed torespond to receiving a conditional write failure notification bydirectly writing the data the direct access storage device 208bypassing, or writing around, the cache structure 206 of the couplingfacility 204. In exemplary embodiments, once the write to the directaccess storage device is completed 208 the data management middleware210 may send a buffer invalidate signal via the coupling facility toinvalidate obsolete locally-cached copies of the data on other systems202, 210. In exemplary embodiments, the data in the working set of thecache structure 206 may be data that is frequently accessed. Inaddition, the data in the working set of data of the cache structure 206may be data that is registered to one or more users, or computingsystems 202.

In exemplary embodiments, the conditional write command protects theworking set of data of the cache structure 206 by preventing the data inthe working set from being displaced by large amounts of less frequentlyused data. In addition, the conditional write command also eliminatesthe processing overhead associated with casting the non-working-set dataout to the direct access storage device 208 by preventing thenon-working-set data from being written to the cache structure 206.Furthermore, the conditional write command minimizes processing delaysthat can result from the cache structure 206 becoming full of changeddata.

In exemplary embodiments, the data management middleware 210 is designedto request conditional writes when appropriate. For example, the datamanagement middleware 210 may be designed to request a conditional writefor a write-intensive database activity such as databasereorganizations, index restructurings, or making application-orientedupdate across all data items. In exemplary embodiments, write operationswhich are associated with such write-intensive activities will requestconditional write processing. However, normal write operations that arenot write-intensive will not request conditional write processing. Inexemplary embodiments, the coupling facility 204 can provide feedback tothe computing system 202 in response to receiving a conditional writecommand from the computing system 202. The feedback can be in the formof a notification sent to the computing system 202 indicating whetherthe conditional write operation succeeded or failed. In response toreceiving a notification that the conditional write command failed fromthe coupling facility 204, the data management middleware 210 will writearound the cache structure 206 of the coupling facility 204 and save thedata to the direct access storage device 208. In exemplary embodiments,the data management middleware 210 may keep a locally-cached copy of thedata in its local buffers on its system.

In exemplary embodiments, if the data management middleware 210 isperforming software duplexing of the data contained in the cachestructure 206 of the coupling facility 204, the data managementmiddleware 210 also performs a write to a secondary cache copy of thestructure if the write to the primary cache copy of the structure wassuccessful. In cases where the write to the primary coupling facilitywas rejected as a conditional write failure, the data should not bewritten to the secondary coupling facility, in order to preservesynchronization between the primary and secondary coupling facilitiescache structure instances.

In exemplary embodiments, the method for managing a cache structure of acoupling facility including conditional write processing protects thecache structure's working set data by preventing the working set datafrom being displaced by large amounts of less frequently used data. Inaddition, the method for managing a coupling facility cache structureincluding conditional write processing also avoids the couplingfacilities cache structure processing overhead associated with writingthe non-working-set data to the direct access data storage devices,i.e., with cast-out processing to move the changed data from thecoupling facility to the direct access data storage devices.

Referring now to FIG. 3, a flow diagram that illustrates a method formanaging a cache structure of a coupling facility including conditionalwrite processing in accordance with an exemplary embodiment is shown. Asshown at block 300, the method includes receiving a conditional writeoperation with associated data. Next, at decision block 302, the methodincludes determining if the associated data is in the working data setof the coupling facility, which is indicated by whether or not theparticular data item is found to be present in the cache structure. Ifthe associated data is not present, it is not part of the working setdata for this workload. If the associated data is not in the workingdata set of the coupling facility, the conditional write is notprocessed and a conditional write failure message is sent to the sourceof the conditional write, as shown at block 304. If the associated datais in the working data set of the coupling facility, the method proceedsto decision block 306. At decision block 306, the method includesdetermining if the cache structure already contains the associated data,if so, then the conditional write is processed as an unconditional writeoperation, as shown at block 310. If the cache structure does notalready contain the associated data, the method includes determining ifthe associated data has more than one registered user, as shown atdecision block 308. In exemplary embodiments, determining if theassociated data has more than one registered user includes determiningthat the only registered user is the user who is performing the write.If the associated data is registered to one or more users other than theuser performing the conditional write, the conditional write isprocessed as an unconditional write operation, as shown at block 310. Ifthe associated data is only registered to the user performing theconditional write, the conditional write is not processed and aconditional write failure message is sent to the source of theconditional write, as shown at block 304. In exemplary embodiments, theconditional write failure message indicates that the write operation wasrejected because the associated data being written was not part of thenormal working set of the coupling facility.

Referring now to FIG. 4, a flow diagram that illustrates a method formanaging a cache structure of a coupling facility including conditionalwrite processing in accordance with an exemplary embodiment is shown. Asshown at block 400, the method includes receiving a conditional writecommand from a computing system. Next, at decision block 402, it isdetermined if the data associated with the conditional write command ispart of a working set of data of the cache structure. If the dataassociated with the conditional write command is part of a working setof data of the cache structure the conditional write command isprocessed as an unconditional write operation, as shown at block 406. Ifthe data associated with the conditional write command is not part of aworking set of data of the cache structure a conditional write failureresponse sent to computing system, as shown at block 404.

In exemplary embodiments, the coupling facility 204 processesconditional write operations received from the data managementmiddleware 210 of the one or more computing systems 202 and determineswhether the computing system 202 should write-around the cache structure206. By having the coupling facility 204 process the conditional writeoperations rather than permitting the computing systems 202 to determinewhen to write around the coupling facility 204, the coupling facility isable to maintain cache coherency and data integrity for the shared dataacross the plurality of computing systems 202 and the data managementmiddleware instances 210.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described below with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, steps, operations, elements, and/orcomponents, but do not preclude the presence or addition of one moreother features, integers, steps, operations, element components, and/orgroups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

The flow diagrams depicted herein are just one example. There may bemany variations to this diagram or the steps (or operations) describedtherein without departing from the spirit of the invention. Forinstance, the steps may be performed in a differing order or steps maybe added, deleted or modified. All of these variations are considered apart of the claimed invention.

While the preferred embodiment to the invention had been described, itwill be understood that those skilled in the art, both now and in thefuture, may make various improvements and enhancements which fall withinthe scope of the claims which follow. These claims should be construedto maintain the proper protection for the invention first described.

What is claimed is:
 1. A system for managing a cache structure of acoupling facility, the system comprising: a processor unit configured toperform a method comprising: receiving a conditional write command froma computing system; determining whether a data associated with theconditional write command is part of a working set of data of the cachestructure; processing the conditional write command as an unconditionalwrite command in the event the data associated with the conditionalwrite command is part of the working set of data of the cache structure;transmitting a conditional write failure notification to the computingsystem in the event the data associated with the conditional writecommand is not part of the working set of data of the cache structure,whereby the conditional write failure notification instructs thecomputing system to write the data associated with the conditional writecommand directly to a direct access storage device; determining whetherthe data associated with the conditional write command is registered toa user other than the user performing the conditional write command; andprocessing the conditional write command as an unconditional writecommand in the event the data associated with the conditional writecommand is registered to a user other than the user performing theconditional write command.
 2. The system of claim 1, wherein the workingset of data of the cache structure includes a set of data that isregistered to one or more users.
 3. The system of claim 1, wherein theworking set of data of the cache structure includes a set of data thatis frequently accessed.
 4. The system of claim 1, wherein theconditional write failure notification instructs the computing system towrite the data associated with the conditional write command directly toa direct access storage device.
 5. The system of claim 1, wherein themethod further comprises: transmitting the conditional write failurenotification to the computing system in the event the data associatedwith the conditional write command is registered to only the userrequesting the conditional write command.